import request from '@/request/request.js'

//老师提交补考信息
export function submitRetakesInfo(data) {
    return request({
        url: '/groupOne/retakes/submitRetakesInfo',
        method: 'post',
        data
    })
}

//管理员查看补考信息
export function getRetakesInfo(data) {
    return request({
        url: '/groupOne/retakes/getRetakesInfo',
        method: 'post',
        data
    })
}

//老师查看自己提交的补考信息
export function getRetakesInfoByTeacher(tid,data) {
    return request({
        url: '/groupOne/retakes/getRetakesInfoByTeacher/'+tid,
        method: 'post',
        data
    })
}

//删除补考信息
export function deleteRetakesInfo(data) {
    return request({
        url: '/groupOne/retakes/deleteRetakesInfo',
        method: 'post',
        data
    })
}
//管理员审核补考不通过
export function refuse(rid,backCause) {
    return request({
        url: '/groupOne/retakes/refuse/'+rid+"/"+backCause,
        method: 'get'
    })
}
//管理员审核补考通过
export function approved(rid) {
    return request({
        url: '/groupOne/retakes/approved/'+rid,
        method: 'get'
    })
}
//根据补考信息id查找对应的补考信息
export function getRetakesInfoById(rid) {
    return request({
        url: '/groupOne/retakes/getRetakesInfoById/'+rid,
        method: 'get'
    })
}